<template>
	<view class="container">
		<view class="itemCate">
			<view class="item" @click="team_1314Tap">
				<view class="item" style="margin-top: 16rpx;" v-if="userInfo.code">会员ID：{{userInfo.code}}</view>
				<view class="item">身份：{{userInfo.rankModel.name}}</view>
				<view class="item" v-if="userInfo.parent">推荐人ID：{{userInfo.parentModel.code}}</view>
				<view class="item" v-if="userInfo.teamModel">团队级别：{{userInfo.teamModel.name}}</view>
				<text class="item">个人消费：{{userInfo.selfPerformance}}</text>
				<text class="item">直推业绩：{{userInfo.verticalPerformance}}</text>
				<text class="item">团队业绩：{{userInfo.teamPerformance}}</text>
				<view class="item" v-if="userInfo.createTime">注册时间：{{$time.dateFormat('YYY-MM-DD hh:mm:ss', userInfo.createTime)}}</view>
				<view class="item" v-if="userInfo.upRankTime">升级时间：{{$time.dateFormat('YYY-MM-DD hh:mm:ss', userInfo.upRankTime)}}</view>
		
				<view style='position: absolute;right: 20rpx;top: 160rpx;'>
					<u-icon name="arrow-right" color="#999999" size="15"></u-icon>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		user
	} from '@/api/user.js'
	import {common} from '@/api/common.js'
	import jcButton from "@/components/jc-button/jc-button.vue"
	import {
		page
	} from '@/api/page.js'
	export default {
		components:{jcButton},
		data() {
			return {
				page: 1,
				size: 8,
				totalPage: 0,
				itemList: [],
				userInfo: {rankModel:{},rankModel_high:{}},
			}
		},
		onLoad() {
			this.loadData()
		},
		onShow() {
			this.getUserInfo()
		},
		onPullDownRefresh() {
			this.loadData()
		},
		methods: {
			loadData(){
				this.getUserInfo()
			},
			back(){
				uni.switchTab({
					url: '/pages/mine/mine'
				})
			},
			outMoneyAction(){
				this.$Router.push({
					name: 'outMoney'
				})
			},
			getUserInfo() {
				user.getUserInfo().then(res => {
					uni.stopPullDownRefresh();
					if (res.data.code == 10000) {
						this.userInfo = res.data.data
					}
				})
			},
			//team_1314
			team_1314Tap(){
				this.$Router.push({
					name: 'team'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.noticeView{
		// position: fixed;
		// left: 0;
		// top: 0;
		z-index: 10;
	}
	.top{
		width: 750rpx;
		height: 200rpx;
		background-color: #d4a781;
	}
	.main{
		// position: relative;
		// top: -130rpx;
	}
	.headView{
		display: flex;
		flex-direction: column;
		align-items: center;
		background-color: #FFFFFF;
		margin: 0 30rpx;
		padding: 40rpx 0;
		border-radius: 20rpx;
		box-shadow:0 8rpx 16rpx rgba(0, 0, 0, 0.08);
		.totalBalance{
			display: flex;
			flex-direction: column;
			align-items: center;
			.title{
				font-size: 30rpx;
				color: #999999;
			}
			.timeLenght{
				font-size: 50rpx;
				font-weight: bold;
			}
		}
		.otherBalance{
			margin-top: 40rpx;
			width: 100%;
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: space-around;
			.item{
				display: flex;
				flex-direction: column;
				align-items: center;
				.title{
					font-size: 30rpx;
					color: #999999;
				}
				.timeLenght{
					font-size: 34rpx;
					font-weight: bold;
				}
			}
		}
		
	}
	
	.CZTX{
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-around;
		margin-top: 20rpx;
	}
	.itemCate{
		display: flex;
		flex-direction: column;
		margin-top: 30rpx;
		position: relative;
		.item{
			margin-left: 30rpx;
			width: 690rpx;
			background-color: #FFFFFF;
			border-radius: 16rpx;
			display: flex;
			flex-direction: column;
			align-items: flex-start;
			justify-content: center;
			position: relative;
			margin-bottom: 10rpx;
		}
	}
</style>
